package com.itheima.sh.homeWork03;


import java.io.FileNotFoundException;
import java.io.FileReader;
import java.io.IOException;

public class BufferedReaderTest {
    public static void main(String[] args) {
        try ( FileReader fr=new FileReader("D:/ITheima/img2/007.txt");){
         char[]chars=new char[1024];
         int len ;
           while ((len=fr.read(chars))!=-1){
               System.out.println(new String(chars,0,len));
           }
        } catch (FileNotFoundException e) {
            e.printStackTrace();
        } catch (IOException e) {
            e.printStackTrace();
        }

    }
}
